#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2019 crane <crane@gosun>
#
# Distributed under terms of the MIT license.

"""

"""

def cnt_squares(l, w):
    cnt = 0

    # length, width
    l, w = max(l, w), min(l, w)

    for square_side in range(1, w+1):
        minu = square_side - 1
        cnt += (l-minu) * (w-minu)

    return cnt

def main():
    print("start main")
    cnt = cnt_squares(5, 5)
    print(cnt)

    cnt = cnt_squares(4, 4)
    print(cnt)

    cnt = cnt_squares(4, 5)
    print(cnt)

    cnt = cnt_squares(4, 6)
    print(cnt)

    cnt = cnt_squares(3, 5)
    print(cnt)

if __name__ == "__main__":
    main()
